home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 April: Mac OS SDK / Dev.CD Apr 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Interfaces / AIncludes / EPPC.a < prev    next >
Encoding:
Text File  |  1996-05-04  |  4.2 KB  |  167 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        EPPC.a
  3. ;
  4. ;    Contains:    High Level Event Manager Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Package:    Universal Interfaces 2.2.1
  8. ;
  9. ;    Copyright:    © 1984-1996 by Apple Computer, Inc.
  10. ;                All rights reserved.
  11. ;
  12. ;    Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13. ;                stack.  Include the file and version information (from above)
  14. ;                in the problem description and send to:
  15. ;                    Internet:    apple.bugs@applelink.apple.com
  16. ;                    AppleLink:    APPLE.BUGS
  17. ;
  18. ;
  19.  
  20.     IF &TYPE('__EPPC__') = 'UNDEFINED' THEN
  21. __EPPC__ SET 1
  22.  
  23.  
  24.     IF &TYPE('__ERRORS__') = 'UNDEFINED' THEN
  25.     include 'Errors.a'
  26.     ENDIF
  27. ;        include 'ConditionalMacros.a'                                ;
  28.  
  29.     IF &TYPE('__APPLETALK__') = 'UNDEFINED' THEN
  30.     include 'AppleTalk.a'
  31.     ENDIF
  32. ;        include 'Types.a'                                            ;
  33. ;        include 'OSUtils.a'                                            ;
  34. ;            include 'MixedMode.a'                                    ;
  35. ;            include 'Memory.a'                                        ;
  36.  
  37.     IF &TYPE('__FILES__') = 'UNDEFINED' THEN
  38.     include 'Files.a'
  39.     ENDIF
  40. ;        include 'Finder.a'                                            ;
  41.  
  42.     IF &TYPE('__PPCTOOLBOX__') = 'UNDEFINED' THEN
  43.     include 'PPCToolbox.a'
  44.     ENDIF
  45.  
  46.     IF &TYPE('__PROCESSES__') = 'UNDEFINED' THEN
  47.     include 'Processes.a'
  48.     ENDIF
  49. ;        include 'Events.a'                                            ;
  50. ;            include 'Quickdraw.a'                                    ;
  51. ;                include 'QuickdrawText.a'                            ;
  52.  
  53.     IF &TYPE('__EVENTS__') = 'UNDEFINED' THEN
  54.     include 'Events.a'
  55.     ENDIF
  56.  
  57. ; postOptions currently supported 
  58. receiverIDMask                    EQU        $0000F000
  59. receiverIDisPSN                    EQU        $00008000
  60. receiverIDisSignature            EQU        $00007000
  61. receiverIDisSessionID            EQU        $00006000
  62. receiverIDisTargetID            EQU        $00005000
  63. systemOptionsMask                EQU        $00000F00
  64. nReturnReceipt                    EQU        $00000200
  65. priorityMask                    EQU        $000000FF
  66. nAttnMsg                        EQU        $00000001
  67.  
  68. ; constant for return receipts 
  69. HighLevelEventMsgClass            EQU        'jaym'
  70. rtrnReceiptMsgID                EQU        'rtrn'
  71.  
  72. msgWasPartiallyAccepted            EQU        2
  73. msgWasFullyAccepted                EQU        1
  74. msgWasNotAccepted                EQU        0
  75.  
  76. TargetID                 RECORD    0
  77. sessionID                 ds.l   1        ; offset: $0 (0)
  78. name                     ds.l   18        ; offset: $4 (4)
  79. location                 ds.l   26        ; offset: $4C (76)
  80. recvrName                 ds.l   18        ; offset: $B4 (180)
  81. sizeof                     EQU *            ; size:   $FC (252)
  82.                         ENDR
  83.  
  84. ; typedef struct TargetID     TargetID
  85. ; typedef TargetID             *TargetIDPtr, **TargetIDHandle, **TargetIDHdl
  86. ; typedef TargetID             SenderID
  87. ; typedef SenderID             *SenderIDPtr
  88. HighLevelEventMsg         RECORD    0
  89. HighLevelEventMsgHeaderLength ds.w   1    ; offset: $0 (0)
  90. version                     ds.w   1        ; offset: $2 (2)
  91. reserved1                 ds.l   1        ; offset: $4 (4)
  92. theMsgEvent                 ds     EventRecord ; offset: $8 (8)
  93. userRefcon                 ds.l   1        ; offset: $18 (24)
  94. postingOptions             ds.l   1        ; offset: $1C (28)
  95. msgLength                 ds.l   1        ; offset: $20 (32)
  96. sizeof                     EQU *            ; size:   $24 (36)
  97.                         ENDR
  98.  
  99. ; typedef struct HighLevelEventMsg  HighLevelEventMsg
  100. ; typedef HighLevelEventMsg  *HighLevelEventMsgPtr, **HighLevelEventMsgHandle, **HighLevelEventMsgHdl
  101. ;
  102. ; pascal OSErr PostHighLevelEvent(const EventRecord *theEvent, unsigned long receiverID, unsigned long msgRefcon, void *msgBuff, unsigned long msgLen, unsigned long postingOptions)
  103. ;
  104.     IF ¬ GENERATINGCFM THEN
  105.         Macro
  106.         _PostHighLevelEvent
  107.             move.w    #$0034,-(sp)
  108.             dc.w     $A88F
  109.         EndM
  110.     ELSE
  111.         IMPORT_CFM_FUNCTION    PostHighLevelEvent
  112.     ENDIF
  113.  
  114. ;
  115. ; pascal OSErr AcceptHighLevelEvent(TargetID *sender, unsigned long *msgRefcon, void *msgBuff, unsigned long *msgLen)
  116. ;
  117.     IF ¬ GENERATINGCFM THEN
  118.         Macro
  119.         _AcceptHighLevelEvent
  120.             move.w    #$0033,-(sp)
  121.             dc.w     $A88F
  122.         EndM
  123.     ELSE
  124.         IMPORT_CFM_FUNCTION    AcceptHighLevelEvent
  125.     ENDIF
  126.  
  127. ;
  128. ; pascal OSErr GetProcessSerialNumberFromPortName(const PPCPortRec *portName, ProcessSerialNumber *pPSN)
  129. ;
  130.     IF ¬ GENERATINGCFM THEN
  131.         Macro
  132.         _GetProcessSerialNumberFromPortName
  133.             move.w    #$0035,-(sp)
  134.             dc.w     $A88F
  135.         EndM
  136.     ELSE
  137.         IMPORT_CFM_FUNCTION    GetProcessSerialNumberFromPortName
  138.     ENDIF
  139.  
  140. ;
  141. ; pascal OSErr GetPortNameFromProcessSerialNumber(PPCPortRec *portName, const ProcessSerialNumber *pPSN)
  142. ;
  143.     IF ¬ GENERATINGCFM THEN
  144.         Macro
  145.         _GetPortNameFromProcessSerialNumber
  146.             move.w    #$0046,-(sp)
  147.             dc.w     $A88F
  148.         EndM
  149.     ELSE
  150.         IMPORT_CFM_FUNCTION    GetPortNameFromProcessSerialNumber
  151.     ENDIF
  152.  
  153. ;
  154. ; pascal Boolean GetSpecificHighLevelEvent(GetSpecificFilterUPP aFilter, void *contextPtr, OSErr *err)
  155. ;
  156.     IF ¬ GENERATINGCFM THEN
  157.         Macro
  158.         _GetSpecificHighLevelEvent
  159.             move.w    #$0045,-(sp)
  160.             dc.w     $A88F
  161.         EndM
  162.     ELSE
  163.         IMPORT_CFM_FUNCTION    GetSpecificHighLevelEvent
  164.     ENDIF
  165.  
  166.     ENDIF ; __EPPC__
  167.